๐๏ธGitะฏัะฐ๐๏ธ
.github/copilot-instructions.md 8f9eec5c0819ec4d9b8a69e6dfc7aaacd86e30a6 (8f9eec5c) Text, 3.84 KB
Tc9d1d9# Meshtastic Android โ Copilot Instructions
Tff7b72> **`AGENTS.md` is the source of truth** for rules, architecture, and conventions. This file is a compact Copilot quick-reference plus Copilot-only behavior rules โ it deliberately does not restate AGENTS.md. For build/test detail see `.skills/testing-ci/`; for the codebase map and bootstrap see `.skills/project-overview/`.
Tc9d1d9## Build, Test & Lint (essentials)
Requires JDK 25 and Ta5d6ff`ANDROID_HOME`. Per fresh clone:
Ta5d6ff```Ta5d6ffbash
Tff7b72[ -f local.properties Tff7b72] Tff7b72|| cp secrets.defaults.properties local.properties
Ta5d6ff```
Ta5d6ff```Ta5d6ffbash
./gradlew spotlessApply detekt assembleDebug Tffa657test allTests T8b949e# full local verification (run before push)
./gradlew :core:data:allTests T8b949e# single KMP module
./gradlew :androidApp:testFdroidDebugUnitTest T8b949e# single Android-only module
./gradlew kmpSmokeCompile T8b949e# cross-platform compile check, no tests
Ta5d6ff```
Tff7b72> Both `test` AND `allTests` are needed โ `allTests` covers KMP modules, `test` covers pure-Android modules.
**KMP vs Android-only task naming** (wrong name silently skips tests or fails resolution): KMP modules (Ta5d6ff`core:*`, Ta5d6ff`feature:*`) use Ta5d6ff`:module:allTests` and Ta5d6ff`:module:compileKotlinJvm`; Android-only modules (Ta5d6ff`app`, Ta5d6ff`core:api`, Ta5d6ff`core:barcode`) use Ta5d6ff`:module:testFdroidDebugUnitTest`. Ta5d6ff`:module:detekt` is the lifecycle task for both โ never Ta5d6ff`detektMain`/Ta5d6ff`detektDebug`. Full matrix and pitfalls: Ta5d6ff`.skills/testing-ci/`.
Architecture, flavors, conventions, branch naming, protos, coding rules: **see `AGENTS.md`**. Contextual Ta5d6ff`.github/instructions/` files enforce conventions scoped to specific source sets.
Tc9d1d9## Copilot-Only Behavior Rules
These are specific to the Copilot CLI environment and are not covered in AGENTS.md.
Tff7b72- **Do it right the first time.** When refactoring, implement the correct solution fully โ don't defer improvements as "out of scope". Research the proper API before implementing.
Tff7b72- **Preserve commit history.** Always make new commits. Never Ta5d6ff`--amend`, Ta5d6ff`rebase -i`, squash, or Ta5d6ff`--force-with-lease` unless the user explicitly requests it.
Tff7b72- **Workflow-scope push limit.** The Copilot CLI OAuth token cannot push to Ta5d6ff`.github/workflows/`. If a push fails with a scope/permission error on workflow files, tell the user to push manually (Ta5d6ff`gh auth refresh -s workflow && git push`) โ do not retry or work around it.
Tff7b72- **No destructive git in parallel agents.** Agents sharing a worktree must never run Ta5d6ff`git reset --hard`, Ta5d6ff`git clean`, or Ta5d6ff`git checkout -- .`. Commit work before any index/working-tree operation.
Tff7b72- **Audit before applying.** When porting or migrating external code, evaluate each change for relevance and correctness in our context โ don't blindly copy.
Tc9d1d9## Context & Cost Efficiency
Tff7b72- **Compact before research phases.** Open-ended research/exploration generates high-volume tool output โ compact first.
Tff7b72- **Split sessions at phase boundaries.** Don't keep one session alive across multiple discrete deliverables (PR opened, spec finalized, merged). A compact summary in a fresh session is cheaper than carrying accumulated history.
Tff7b72- **Don't re-inject skill context.** If a skill's context is already in the session, reference it rather than re-injecting the full payload (a brief summary suffices after compaction).
Tff7b72- **PR check-ins get their own session.** Merge/CI-status polling needs only PR metadata โ run it in a short-lived session, not the dev session.
Tff7b72- **Compact by ~turn 12.** Later turns pay for the full accumulated history; don't let exploratory sessions run 15+ turns uncompacted.
<!-- SPECKIT START -->
For additional context about technologies to be used, project structure,
shell commands, and other important information, read the current plan at
specs/20260711-153545-message-markdown-styling/plan.md
<!-- SPECKIT END -->
Served by rngit 1.5.2 - Generated in 0.21s